home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / sys / InstallerNG.lha / Installer / Install < prev    next >
Encoding:
Text File  |  1999-08-28  |  10.7 KB  |  284 lines

  1.  
  2. /*********************************************************************************************
  3.  *
  4.  * installation script for the InstallerNG $VER: 1.1 (28.08.99)
  5.  *
  6.  * note, that this script makes use of seveal new features of the InstallerNG
  7.  * like multilined comments and enhanced pattern-match functionality of the DATABASE
  8.  * function
  9.  *
  10.  *********************************************************************************************/
  11.  
  12. (if (= @language "english")
  13.  
  14.     (
  15.       (set #msg_welcome (cat "Welcome to the Installation of the InstallerNG\n\n"
  16.                              "The InstallerNG wants to be a substitution of\n"
  17.                              "the original Installer by C=\n"
  18.                              "It offers many new features, looks much better and is\n"
  19.                              "smaller than the C= Installer"
  20.                         )
  21.       )
  22.       (set #msg_askfile_prompt "Where is the default Installer located?")
  23.       (set #msg_askfile_help (cat "Please select the original Installer by C=. "
  24.                                   "This script will make a backup copy of the "
  25.                                   "Installer and then, it will replace the "
  26.                                   "original by the new InstallerNG."
  27.                              )
  28.       )
  29.       (set #msg_copylib_prompt "Now copying the InstallerNG to \"%s\"")
  30.       (set #msg_copylib_help "...")
  31.  
  32.       (set #msg_catalog_prompt "Which catalog-file do you want to install?")
  33.       (set #msg_catalog_help "...")
  34.  
  35.       (set #msg_done (cat "Done!\n"
  36.                           "The InstallerNG replaced the original Installer\n"
  37.                           "and made a copy of the old one in \"%s\".\n\n"
  38.                           "Have fun with the new Installer and its features"
  39.                      )
  40.       )
  41.  
  42.       (set #msg_rename_prompt "Now renaming the C= installer")
  43.       (set #msg_rename_help "...")
  44.  
  45.       (set #msg_copytools_prompt "Which additional tools you want to install? (see Help)")
  46.       (set #msg_copytools_help (cat "CloseScreenPatch\nA patch, which avoids screen closing, while a window "
  47.                                     "is still open on that screen and helps you to save memory. Just add "
  48.                                     "'run <>nil: c:closescreenpatch' to the end of your 's:user-startup' file"
  49.                                     "\n\nGetSum\n"
  50.                                     "Calculates the checksum of any file, like the Installer does. "
  51.                                     "Usage: type 'getsum <file>' in your shell"
  52.                                )
  53.       )
  54.  
  55.       (set #msg_tooltypes_prompt "Which Tooltypes you want to preset?")
  56.       (set #msg_tooltypes_help "...")
  57.  
  58.       (set #msg_askchoice_prompt "Which GUI do you want to use?")
  59.       (set #msg_askchoice_help "...")
  60.  
  61.       (set #message_letsgo "Installation prepared. Ready to proceed?")
  62.  
  63.       (set #working_text "Now starting to install the new InstallerNG by Jens Tröger")
  64.     )
  65. )
  66.  
  67. (if (= @language "deutsch")
  68.  
  69.     (
  70.       (set #msg_welcome (cat "Willkommen zur Installation des InstallerNG\n\n"
  71.                              "Der InstallerNG soll ein Ersatz für den\n"
  72.                              "originalen Installer von C= sein\n"
  73.                              "Er bietet viele neue Eigenschaften, sieht viel besser aus\n"
  74.                              "und ist kleiner als der C= Installer"
  75.                         )
  76.       )
  77.  
  78.       (set #msg_askfile_prompt "Wo befindet sich der Installer?")
  79.       (set #msg_askfile_help (cat "Bitte wählen Sie den originalen Installer von C=. "
  80.                                   "Dieses Skript macht eine Kopie des originalen "
  81.                                   "Installers und wird danach den originalen durch "
  82.                                   "den neuen InstallerNG ersetzen."
  83.                              )
  84.       )
  85.  
  86.       (set #msg_copylib_prompt "Kopiere jetzt den InstallerNG nach \"%s\"")
  87.       (set #msg_copylib_help "...")
  88.  
  89.       (set #msg_catalog_prompt "Zu welcher Sprache möchten Sie einen Katalog installieren?")
  90.       (set #msg_catalog_help (cat "Wählen Sie hier aus, welche Katalog Datei Sie installieren möchten. "
  91.                                   "Sinnigerweise sollten Sie 'deutsch' wählen."
  92.                              )
  93.       )
  94.  
  95.       (set #msg_done (cat "Fertig!\n"
  96.                           "Der InstallerNG hat Ihren originalen Installer\n"
  97.                           "ersetzt und eine Kopie des alten als \"%s\" erzeugt.\n\n"
  98.                           "Viel Spaß mit dem neuen Installer und seinen Möglichkeiten"
  99.                      )
  100.       )
  101.  
  102.       (set #msg_rename_prompt "Benenne nun den C= Installer um")
  103.       (set #msg_rename_help "...")
  104.  
  105.       (set #msg_copytools_prompt "Welche zusätzlichen Programme wollen Sie installieren?")
  106.       (set #msg_copytools_help (cat "CloseScreenPatch\nEin Patch, welcher verhindert, daß ein Screen geschlossen "
  107.                                     "wird, auf dem noch Fenster geöffnet sind und somit 'Speicherleichen' "
  108.                                     "vorbeugt. Einfach 'run <>nil: c:closescreenpatch' in 's:user-startup' einfügen"
  109.                                     "\n\nGetSum\n"
  110.                                     "Berechnet die Checksumme einer Datei, wie sie auch der Installer berechnet. "
  111.                                     "Nutzung: 'getsum <file>' in der Shell eingeben"
  112.                                )
  113.       )
  114.  
  115.       (set #msg_tooltypes_prompt "Welche Tooltypes möchten Sie voreinstellen? (siehe Hilfe)")
  116.       (set #msg_tooltypes_help "...")
  117.  
  118.       (set #msg_askchoice_prompt "Welche Oberfläche möchten Sie verwenden?")
  119.       (set #msg_askchoice_help "...")
  120.  
  121.       (set #message_letsgo "Installation vorbereitet. Soll nun weitergemacht werden?")
  122.  
  123.       (set #working_text "Beginne nun mit der Installation des InstallersNG von Jens Tröger")
  124.     )
  125. )
  126.  
  127. /*********************************************************************************************/
  128.  
  129. (effect "center_center" "horizontal" $000000 $33FF33)
  130.  
  131. /*********************************************************************************************/
  132.  
  133. (user expert)
  134. (message #msg_welcome)
  135. (welcome)
  136. (complete 0)
  137.  
  138. ; -----------------------------------------------------------------------------
  139. ; the default settings
  140.  
  141. (set #default_installer "c:installer"
  142.      #default_catalog 0
  143.      #default_tools 0
  144.      #default_tooltypes 0
  145.      #default_gui 0
  146. )
  147.  
  148. ; -----------------------------------------------------------------------------
  149. ; first of all let the user make all the required settings
  150. ; for the installation
  151.  
  152. (swing
  153.  
  154.   (set #default_installer (askfile (prompt #msg_askfile_prompt)
  155.                                    (default #default_installer)
  156.                                    (help #msg_askfile_help)
  157.                           )
  158.   )
  159.  
  160.   (set #default_catalog (askoptions (prompt #msg_catalog_prompt)
  161.                                     (help #msg_catalog_help)
  162.                                     (default #default_catalog)
  163.                                     (choices "Deutsch")
  164.                         )
  165.   )
  166.  
  167.   (set #default_tools (askoptions (prompt #msg_copytools_prompt)
  168.                                   (help #msg_copytools_help)
  169.                                   (default #default_tools)
  170.                                   (choices "CloseScreenPatch" "GetSum")
  171.                       )
  172.   )
  173.  
  174.   (set #default_tooltypes (askoptions (prompt #msg_tooltypes_prompt)
  175.                                       (help #msg_tooltypes_help)
  176.                                       (default #default_tooltypes)
  177.                                       (choices "LAZYCOMPILE" "DEBUGMODE"
  178.                                                "CREATEUNSINSTALL" "COPYFILESCOMMENT"
  179.                                                "ALWAYSCONFIRM" "NOSYSDELETE"
  180.                                       )
  181.                           )
  182.   )
  183.  
  184.   (set #default_gui (askchoice (prompt #msg_askchoice_prompt)
  185.                                (help #msg_askchoice_help)
  186.                                (default #default_gui)
  187.                                (choices "BOOPSI by Savage (builtin)"
  188.                                         "MUI by Savage"
  189.                                )
  190.                     )
  191.   )
  192.  
  193.   (message #message_letsgo)
  194. )
  195.  
  196. ; -----------------------------------------------------------------------------
  197. ; now the installation process itself
  198.  
  199. (set #installer_backup (cat #default_installer ".backup"))
  200.  
  201. (if (not (exists #installer_backup (noreq)))
  202.     (
  203.       (rename #default_installer #installer_backup (confirm average)
  204.                                                    (prompt #msg_rename_prompt)
  205.                                                    (help #msg_rename_help)
  206.       )
  207.     )
  208.  
  209. (complete 15)
  210.  
  211. (copylib (prompt (#msg_copylib_prompt #default_installer))
  212.          (help #msg_copylib_help)
  213.          (confirm average)
  214.          (source (if (database "cpu" "(68000|68010)")
  215.                      ("c/installer000")
  216.                      ("c/installer020")
  217.                  )
  218.          )
  219.          (dest (pathonly #default_installer))
  220.          (newname (fileonly #default_installer))
  221.          (infos)
  222. )
  223.  
  224. (complete 30)
  225.  
  226. (if (bitand #default_tools 1)
  227.     (copyfiles (source "tools/GetSum")
  228.                (dest "C:")
  229.     )
  230. )
  231. (if (bitand #default_tools 2)
  232.     (copyfiles (source "tools/CloseScreenPatch")
  233.                (dest "C:")
  234.     )
  235. )
  236.  
  237. (complete 45)
  238.  
  239. (if (exists (tackon #default_installer ".info"))
  240.  
  241.     (tooltype (dest #default_installer)
  242.               (setstack 50000)
  243.               (if (bitand #default_tooltypes  1) (settooltype "LAZYCOMPILE" "")
  244.                                                  (settooltype "(LAZYCOMPILE)" ""))
  245.               (if (bitand #default_tooltypes  2) (settooltype "DEBUGMODE" "")
  246.                                                  (settooltype "(DEBUGMODE)" ""))
  247.               (if (bitand #default_tooltypes  4) (settooltype "CREATEUNINSTALL" "")
  248.                                                  (settooltype "(CREATEUNINSTALL)" ""))
  249.               (if (bitand #default_tooltypes  8) (settooltype "COPYFILECOMMENT" "")
  250.                                                  (settooltype "(COPYFILECOMMENT)" ""))
  251.               (if (bitand #default_tooltypes 16) (settooltype "ALWAYSCONFIRM" "")
  252.                                                  (settooltype "(ALWAYSCONFIRM)" ""))
  253.               (if (bitand #default_tooltypes 32) (settooltype "NOSYSDELETE" "")
  254.                                                  (settooltype "(NOSYSDELETE)" ""))
  255.     )
  256.  
  257.     (nop)
  258. )
  259.  
  260. (complete 60)
  261.  
  262. (if (bitand #default_catalog 1)
  263.     (copylib (source "catalogs/deutsch/installerng.catalog")
  264.              (dest "locale:catalogs/deutsch")
  265.     )
  266. )
  267.  
  268. (complete 75)
  269.  
  270. (select #default_gui
  271.  
  272.         (nop)
  273.  
  274.         (copylib (source "libs/mui/installergui.library")
  275.                  (dest "libs:")
  276.         )
  277. )
  278.  
  279. (complete 100)
  280.  
  281. (exit (#msg_done #installer_backup) (quiet))
  282.  
  283.